#ifndef FISICA_MOTOR_H_
#define FISICA_MOTOR_H_

class btBroadphaseInterface;
class btDefaultCollisionConfiguration;
class btCollisionDispatcher;
class btSequentialImpulseConstraintSolver;
//class btDiscreteDynamicsWorld;
class btDynamicsWorld;
class btRigidBody;
class btIDebugDraw;


namespace Fisica {
   class MotorFisico {
      private:
         static MotorFisico* self;

         btBroadphaseInterface* broadphase;
         btDefaultCollisionConfiguration *collisionConfiguration;
         btCollisionDispatcher *dispatcher;
         btSequentialImpulseConstraintSolver *solver;
         btDynamicsWorld *dynamicsWorld;

         btIDebugDraw *debug;

         MotorFisico();
         ~MotorFisico();

      public:
         static MotorFisico* getMotor();
         static void liberarRecursos();

         void setGravedad(float x, float y, float z);
         void agregar(btRigidBody* body);
         void remover(btRigidBody* body);

         void play();
         void drawDebug();
         btDynamicsWorld* internal();
   };
}

#endif
